function h = entropyCount(c)
    s = sum(c);
    if s == 0
        error('Zero count');
    end
    c = c / s;
    h = 0;
    for i = 1:length(c)
        if c(i) > 0
            h = h - c(i) * log(c(i));
        end
    end
end
